<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<html>
<head>
    <meta charset="utf-8" />
    <title>厅干部平时考核管理系统</title>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/views/khrygxsz.js'/>"></script>
    <style type="text/css">
        .success{
            background: blue;
        }
    </style>
    <!--树结构-->
</head>

<body style="overflow-x:hidden;overflow-y:hidden;">
<input type="hidden" id="deptid" value="-1" />
<input type="hidden" id="taskId" value="${taskId}" />
<input type="hidden" id="checkdbid"  />
<div class="bmkhcp" style="overflow-x:hidden;overflow-y:hidden;">
    <div class="bmkhcp_row" >
        <div class="bmkhcp_lf">
            <div class="title">考核关系设置</div>
            <div class="rygl">
                <div class="rygl_lf" id="rygl_lf">
                    <ul id="treeDemo" class="ztree" style="width:220px;overflow-x:hidden;height:440px"></ul>
                </div>
                <div class="rygl_rt" id="rygl_rt">
                    <div class="rygl_rt_main">
                        <div class="bmgl_block">
                            <div class="bmgl_block_top">
                                考核人
                                <div class="rydd" id="kgadd" style="width: 80px;">
                                    <img src="<c:url value='/resource/jxkh/images/rydd_icon.png'/>" />新增
                                </div>
                            </div>
                            <table id="boot_table"  ></table>
                        </div>
                        <div class="bmgl_block bmgl_block1" >
                            <div class="bmgl_block_top" id="khrydiv" style="display: none;">
                                <div id="khry">考核人员</div>
                                <div class="rydd" id="bkhradd"  style="width: 80px;margin-top: -28px;;">
                                    <img src="<c:url value='/resource/jxkh/images/rydd_icon.png'/>" />新增
                                </div>
                            </div>
                            <table id="boot_table1"  ></table>
                        </div>
                    </div>

                </div>
            </div>

        </div>
    </div>
</div>
<!--创建考核关系弹出框结束-->
<script type="text/javascript">
    $(document).ready(function() {
        $("#date_pop").hide();
        //人员选择弹出框
        $("#kgadd").on("click", function() {
            if($("#deptid").val()=="-1"){
                showMessage("请先选择部门");
            }else{
            var url = "<c:url value='/task/relation/addChecker.html'/>" +"?taskId="+$("#taskId").val()+"&deptid="+$("#deptid").val();
             layer.open({
                type: 2,                                    //0（信息框，默认）1（页面层）2（iframe层）3（加载层）4（tips层）。
                shift: 1,//动画    0-6     css3动画
                closeBtn: 1,       //关闭按钮  0 不显示  style  1和2  标题为 false 2
                btn: ['保存', '取消'],
                shade: [0.8, '#393D49'],
                btn1: function(index, layero){
                    var newpsw = $(layero).find("iframe")[0].contentWindow;
                    newpsw.submitForm();
                },
                title:['新增考官','background:#5f9ad1;color:#fff;text-align: left;font-size: 18px;'],
                area: ['900px', '550px'], //宽高
                content:url //iframe层-禁滚动条  $("#photosDemo").html()   'http://www.baidu.com/'
            });
            }
        });
    });
    function refreshTable(){
        var opt = {
            url :"/jxkh/task/relation/checkList.json",//考官列表
            silent: true,
            query:{
                taskId:$("#taskId").val(),
                deptid:$("#deptid").val()
            }
        };
        $("#boot_table").bootstrapTable('refresh', opt);
    }
    function refreshTable1(){
        var opt = {
            url :"/jxkh/task/relation/relationList.json",//考官列表
            silent: true,
            query:{
                checkerdbid:$("#checkdbid").val()
            }
        };
        $("#boot_table1").bootstrapTable('refresh', opt);
    }
</script>
</body>

</html>